<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const info = { age: 20, name: "jack", h: 20 };
      // 代码补全
      const user = {};
      for (let k in info) {
        user[k] = info[k]; //user['name']=info['name']
      }
      // user.age = 20;
      // user.name = "jack";

      console.log("info:", info); // {age:20,name:'jack'};
      console.log("user:", user); // {age:20,name:'jack'};
      console.log(user !== info); // true
    </script>
  </body>
</html>
